<!DOCTYPE html>
<title>Test for loading invalid multipart image</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script>
async_test(t => {
    const img = document.createElement('img');
    img.onload = t.step_func(() => {
        assert_unreached('The image should not be loaded');
    });
    img.onerror = t.step_func_done((e) => {
        assert_equals(e.type, 'error');
    });
    img.src = 'resources/invalid-multipart-image.php';
}, 'invalid multipart image should not be loaded');
</script>
